<!-- 用户设置 -->
<script setup>
import {ref} from "vue";

const dialogVisible = ref(false)

// 提交表单
const onSubmit = (rule) => {

}

// 取消按钮
const onCancel = () => {
 dialogVisible.value = false
}

// 开启
const onOpen = () => {
 dialogVisible.value = true
}

defineExpose({
 onOpen,
 onCancel,
})
</script>

<template>
 <el-dialog v-model="dialogVisible" :before-close="onCancel">
  <template #footer>
   <div class="dialog-footer">
    <el-button @click="onCancel">取消</el-button>
    <el-button type="primary" @click="onSubmit">
     确认
    </el-button>
   </div>
  </template>
 </el-dialog>
</template>

<style scoped lang="scss">

</style>